<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j" xmlns:p="http://primefaces.org/ui"
	xmlns:t="http://myfaces.apache.org/tomahawk" template="/pages/template/main-layout-oa.xhtml">

	<ui:define name="content">
		<h:panelGrid columns="1" width="100%" id="panelGroup">
			<p:panel header="#{msgs.comment}" id="panelGrid">
				<p:dataTable value="#{unreadCommentsBean.unreadModel}" var="cm" id="unreadlist" rowIndexVar="ri">
					<p:column styleClass="width5">
						<f:facet name="header">
							<h:outputText value="#{msgs.table_index}" />
						</f:facet>
						<h:outputText value="#{ri+1}" />
					</p:column>
					<p:column headerText="#{msgs.default_name_surname}">
						<h:outputText value="#{cm[1].patient.surname} #{cm[1].patient.name}" />
					</p:column>
					<p:column headerText="#{msgs.patient_therapy_startDate}">
						<h:outputText value="#{cm[0].startDate}">
							<f:convertDateTime pattern="dd/MM/yyyy" />
						</h:outputText>
					</p:column>

					<p:column headerText="#{msgs.patient_therapy_success}">
						<h:outputText value="#{cm[0].success}" converter="enumConverter" enumName="TherapySuccess" />
					</p:column>

					<p:column headerText="#{msgs.default_status}">
						<h:outputText value="#{cm[0].status}" converter="enumConverter" enumName="TherapyStatus" />
					</p:column>
					<p:column headerText="#{msgs.comment_label}">
						<t:htmlTag style="float:left;" styleClass="ui-icon ui-icon-comment red" value="span"></t:htmlTag>
						<h:outputText value="&#160;" escape="false"/>
						<h:outputText value="#{cm[2]}" style="color:red;" />
					</p:column>
					<p:column style="width:5%;">
						<p:commandButton ajax="false" icon="ui-icon-search" title="#{msgs.patient_therapy_go}"
							action="#{unreadCommentsBean.linkAction}" />
					</p:column>
				</p:dataTable>
			</p:panel>
		</h:panelGrid>
	</ui:define>
</ui:composition>
